Markdown (.md)
Background & Context

-
- Registered MIME types: text/markdown, text/x-markdown
- A markup language allowing formatting text documents.
- Plain text format.
Import & Export

- Import["file.md"] imports a Markdown file as plaintext.
- Import["file.md",elements] imports the specified elements.
- The import format can be specified with Import["file","Markdown"] or Import["file",{"Markdown",elem,…}].
- Export["file.md",expr] creates a Markdown file from expr.
- Expressions representing table data are exported as Markdown tables.
- Image and Graphics objects are converted to PNG images when exporting to Markdown.
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements

- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Plaintext" a string giving the textual content of the whole document "FormattedText" a sequence of formatted text for the whole document "Notebook" a Notebook expression "NotebookObject" a NotebookObject expression
Import Options

- Import options include:
-
ByteOrdering Automatic ordering of bytes CharacterEncoding "UTF8ISOLatin1" raw character encoding used in the file "ImportImages" True - whether to import images
- By default, Import attempts to interpret the data as "UTF8"-encoded text. If any sequence of bytes stored in the file cannot be represented in "UTF8", Import uses "ISOLatin1" instead.
Export Options

- Export options include:
-
"ExpressionFormattingFunction" Automatic - how expressions stored in a Tabular object are converted to strings
"SnippetRowCount" Infinity number of rows taken from the beginning and the end of table data during conversion to strings - "ExpressionFormattingFunction" can be set to the following values:
-
Automatic default conversion to string form any form supported by Format such as InputForm f arbitrary function that converts an expression to a string - "SnippetRowCount" can be set to the following values:
-
Infinity all rows are exported n only the first n rows are exported {n} the first and the last n rows are exported {m,n} the first m and and the last n rows are exported
Examples
open all close allBasic Examples (3)
Scope (4)
Import (2)
Export (2)
Import Elements (5)
Import Options (3)
CharacterEncoding (1)
The character encoding can be set to any value from $CharacterEncodings:
"ImportImages" (2)
Export Options (2)
"ExpressionFormattingFunction" (1)
History
Introduced in 2025 (14.2) | Updated in 2025 (14.3)