All options are passed via ConversionOptions (builder pattern in Rust, keyword arguments in Python/Ruby/Elixir/R, object literal in TypeScript, struct in Go/Java/C#, constructor in PHP).
When link text equals the href, emit <url> instead of [url](url).
default_title
bool
false
Use the href as link title when no title attribute is present.
link_style
"inline" | "reference"
"inline"
inline emits [text](url). reference emits [text][1] with numbered definitions collected at the end of the document.
url_escape_style
"angle" | "percent"
"angle"
Escaping for link/image URL destinations. angle wraps destinations containing spaces or newlines in <...>. percent percent-encodes every character that is not an RFC 3986 unreserved character or /.
Element names where images should be kept as Markdown  rather than converted to alt text.
extract_images
bool
false
Extract data URIs and embedded SVGs. Rust and WASM expose inline images when built with inline-images; generated native bindings may omit the Rust-only image payload.
skip_images
bool
false
Drop image elements entirely. No  output, no alt-text fallback.
max_image_size
int (bytes)
5242880
Maximum byte size for an extracted inline image. Larger images are skipped. 5 MB default.
capture_svg
bool
false
Include inline <svg> elements in result.images when extract_images is enabled.
infer_dimensions
bool
true
Infer missing width and height from decoded image bytes when extracting inline images.
Maximum DOM traversal depth. null uses the library’s internal native-stack safety limit (64). Values above the limit are clamped to an absolute ceiling (1024) to guard against stack overflow on pathologically deep input; there is no way to disable the depth limit entirely.
exclude_selectors
array
[]
CSS selectors for elements to drop entirely, including all descendants (unlike strip_tags, which keeps the text content). Supports tag names, .class, #id, [attribute], etc. Invalid selectors are silently skipped at conversion time.
tier_strategy
"auto" | "tier2"
"auto"
Which internal conversion path to use. auto runs a fast byte-scanner (Tier 1) when eligible and falls back to the full DOM walk (Tier 2) otherwise. tier2 always uses the DOM-walk path. Not exposed as a stable option in every binding.
Conversion output is not sanitized. There is no configurable cap on input size — callers that accept HTML
from untrusted sources are responsible for enforcing their own size limits before calling convert(). See
Security.
CLI only. Character encoding of the input file or stdin. The value must be a label that the WHATWG Encoding Standard recognises ("windows-1252", "shift_jis", "iso-8859-1", etc.). The core library stores but does not use this field; decoding happens in the CLI before the string reaches convert().
CLI only. When true, the CLI prints diagnostic lines to stderr after each conversion (e.g. "Generated 1234 bytes of markdown"). The core library stores but does not act on this field.
Populate result.metadata (title, description, Open Graph, Twitter Card, JSON-LD, links, images). Table extraction into result.tables runs unconditionally — it is not gated by this flag.
preprocessing is a nested PreprocessingOptions value (Rust field names shown below; bindings expose the
same sub-fields as keyword arguments or a nested object). The CLI uses different flag names for the same
settings (--preprocess, --keep-navigation, --keep-forms) — those CLI-only names do not exist on
ConversionOptions; see CLI Reference.
Option
Type
Default
Description
enabled
bool
true
Enable HTML preprocessing globally. Required for the options below to have an effect.
preset
"minimal" | "standard" | "aggressive"
"standard"
Preset level carried through for forward compatibility. Current releases honour the boolean flags below and do not branch on preset.
remove_navigation
bool
true
Remove <nav>, and remove <header>/<footer>/<aside> that otherwise look like navigation.
remove_forms
bool
true
Accepted and stored. Current releases do not drop form elements during preprocessing regardless of this flag.
When enabled is true and remove_navigation is true (the default for both), the preprocessor drops:
every <nav> element
<header> elements outside a semantic content ancestor (<article>, <main>, etc.)
<header>, <footer>, and <aside> that carry navigation hints in their class or id attributes (menu, sidebar, breadcrumb, and similar)
Script and style tags are always stripped before the DOM walk starts, independent of enabled.
markdown and djot both preserve structure and link targets. djot uses single-asterisk strong emphasis; markdown uses double asterisks. plain strips all formatting, link targets, and list markers, returning readable text only.