Skip to content

.mkit files

A .mkit file is Molkit’s document format. It stores the whole document as JSON, including every structure, annotation, and animation, the document settings, and the metadata. Save a .mkit file when you want to come back to a drawing and keep editing it. To share a finished image, export an SVG or PNG instead.

To save the active document, press Ctrl+S or click File > Save.

The first time you save an untitled document, Molkit asks for a filename and then writes a .mkit file. If you are editing text when you save, the edit is committed first, so the file includes it.

Save (Ctrl+S) writes to the current file. Save As (Ctrl+Shift+S, or File > Save As) always asks for a name and starts a new file.

How saving works depends on your browser.

Chrome and Edge let Molkit write directly to a file on disk.

  • The first save, and every Save As, opens the system’s save dialog.
  • After that, Ctrl+S writes back to the same file without a dialog, and a “Saved” message confirms it.
  • If the browser has lost permission to the file, Ctrl+S opens the save dialog instead.

Browsers that cannot write to a file on disk, such as Firefox and Safari, save every file as a download.

  • The first save, and every Save As, opens Molkit’s Save File dialog. Type a name in Filename; .mkit is added.
  • Later, Ctrl+S downloads the file again under the same name without asking.
  • Each save is a new download. Your browser’s download settings decide where it goes, and the browser may add a number to the name if a file with that name is already in the folder. To update the original file, move the downloaded copy over it.
  • After a save, the tab shows an amber dot. Hover over the tab for a reminder that the last save was a download. The dot changes to the unsaved color as soon as you edit again.

The Save File dialog has two options:

  • Pretty-print JSON (larger file): writes indented, human-readable JSON. The browser remembers the setting for later saves.
  • Embed custom fonts in file: shown only when the document uses a font you uploaded. When selected, every uploaded font that the document uses is written into the file.

In Firefox, each save also stores a private recovery copy inside the browser. See Browsers that save by download under recovery.

A .mkit file can carry the font files for fonts you uploaded from disk, so that the document looks the same on a computer that does not have them.

  • When you open a file that contains fonts, Molkit installs them in your browser’s font library so that they display right away.
  • Every later save of that document writes those fonts back into the file, as long as the document still uses them. This applies to Ctrl+S, Save As, and saves by download.
  • To add fonts that you uploaded yourself, use Embed custom fonts in file in the Save File dialog of browsers that save by download. Chrome and Edge saves do not have this option; they keep only the fonts that the file arrived with.
  • If a font cannot be read from the browser’s font library at save time, a warning names it. The file still saves, but other computers show a default font in its place.

Google fonts are not stored in the file. They load from Google Fonts when the document opens. See Manage fonts.

To open a .mkit file, press Ctrl+O or click File > Open.

Chrome and Edge show the system file picker; other browsers use a standard file chooser. Opened files load into a new tab, and the view fits to the content. Files with the older .json extension from earlier versions also open.

Inserted figures (electron configurations, MO diagrams, hybridization diagrams, and hybrid orbitals) are redrawn from their settings when the file opens. Each keeps its size and position. If Molkit cannot redraw a figure, it shows the picture saved in the file.

A file that was cut short or edited by hand can hold values Molkit cannot use. Molkit opens the rest of the file:

  • A damaged item, such as an atom with no position, is left out.
  • A damaged value, such as a bond order that no bond has, goes back to its default.
  • A warning gives the number of repairs and names the first few.
  • The tab opens as unsaved, and saving writes a new file, so the damaged original stays on disk as it was. In Chrome and Edge, Save asks for a name, as Save As does.

Values that only need a different form, such as a number written as text, are read without a warning. The same repair runs when Molkit restores a tab after a crash and when you paste or import an SVG exported with Include editable source.

The file holds:

  • Structures: atoms and bonds, with their positions and per-object styling.
  • Annotations: text, arrows, shapes, brackets, and projections.
  • Animation states, when present.
  • Document settings: page setup, color scheme, and structure settings.
  • Metadata for the document and for each structure.
  • Embedded fonts, when the file carries any (see Fonts in .mkit files).
  • The 3D geometry of an electrostatic potential map, if you chose Use this geometry for the molecule.

Electrostatic potential maps are saved in the file, but only the maps of molecules in this document. If a map in a file cannot be read when the file opens, Molkit leaves the map out with a warning and opens the rest. See Electrostatic potential maps.

Molkit opens files saved by earlier versions and converts them. If a file was saved by a newer version of Molkit, a warning says it may not load correctly, and Molkit then tries to read it.

Saving a .mkit file is separate from the copy that Molkit keeps in the browser. If the app or the browser closes unexpectedly, Molkit restores your open tabs from that copy. See Tabs, auto-save, and recovery for how it works and what to do after a crash.