How to convert YAML, JSON and TOML in Obsidian

As of October 2026, Obsidian documents code blocks for displaying examples, rather than converting their data formats. Use Data Format Converter to preview selected YAML, JSON or TOML and confirm replacement.

Background

Keep a configuration example separate from the rest of your Markdown note. The converter reads selected data without its surrounding code fences.

2 ways to do it

  1. Edit the example by hand

    Obsidian supports fenced code blocks with a language label. Keep a copy of your example and edit its contents when you already know the target syntax.

    For a simple string, YAML name: Ada becomes JSON {"name":"Ada"} or TOML name = "Ada". Compare the values yourself before replacing the source.

    limits
    This is a manual editing route inferred from the formatting documentation. It provides no parser or value comparison.
  2. Data Format Converter from this site

    Select the data inside the block and choose its source and target formats. Read the output before confirming replacement.

    limits
    Comments and source formatting change, and unsupported values stop conversion. Local schema validation and batch file creation need Pro.
    A null value stops conversion to the TOML format.
    Open larger

    MIT · no telemetry · core features free

    All features of Data Format Converter

Convert a selected record

  1. Open a note and select the data without the code block fences.

  2. Run Convert selected data from the command palette.

  3. Choose the source and target formats.

  4. Read the preview and warning, then select Replace selection or Cancel.

Common questions

Should I select the language label too?

No. Select only the data between the opening and closing fences.

How do I handle a date object?

Use a quoted string if that representation fits your data. The converter won't choose a date representation for you.

Sources

Photo of Michael LipYou can now convert YAML, JSON and TOML.

Obsidian rewards people who share. NoteMods is just me and a lot of coffee. If this guide saved you a fight with the syntax, buy me a cup.