image Image
Convert Image Image to Base64 Converter
descriptionText
Compare textText to Hex Text to Base64 Word CounterCase ConverterVietnamese Accent Remover & Slug GeneratorRegex Tester
Json
Json to Excel/Csv JSON ⇄ YAML ConverterJSON to TypeScript, C# & Go
table_chartExcel
Excel/Csv to Json Excel/Csv to Sql Excel/Csv to Html
scheduleTime
Convert datetime Timezone Info
Url
Encode and Decode URLs Shorten URL
smart_displayVideo
Download Youtube
Sql
Statistics Parser Statistics Compare
SEO
Create Sitemap
listFormatter
Json FormatterXML FormatterCSS FormatterHtml FormatterJs FormatterSql FormatterException Formatter
listOther
Convert TokenConvert HashColor PickerGenerate PasswordQR Code GeneratorQR Code ScannerVietQR Bank Transfer QR GeneratorUUID / ULID / NanoID GeneratorNumber Base Converter
searchSearch
Search tools
codeTracer
C# Tracer Formatter
help_outlineAbout
About UsPrivacy PolicyTerms of Service
THUTOOL
other tool Json to Excel/Csv keyboard_double_arrow_right Shorten URL keyboard_double_arrow_right Color Picker keyboard_double_arrow_right

JSON ⇄ YAML Converter

🔒 Processed 100% in your browser – your data never leaves your device

JSON to YAML

YAML to JSON


How to convert JSON to YAML and YAML to JSON

This free converter works in both directions on one page. Everything is processed in your browser with the open-source js-yaml library, so your data never leaves your device.

JSON to YAML

  1. Paste or type JSON into the JSON input box. The YAML output updates automatically as you type.
  2. Choose an indent of 2 or 4 spaces.
  3. Click Copy or Download to save the result as output.yaml.

YAML to JSON

  1. Paste YAML (for example a Docker Compose, Kubernetes or GitHub Actions file) into the YAML input box.
  2. Pick pretty output with 2 or 4 spaces, or minified JSON.
  3. Copy or download the result as output.json.

Tips

  • If the input has a syntax error, the exact line and column are shown under the box so you can fix it quickly.
  • Anchors and aliases (&base, *base) are expanded in the JSON output.
  • A YAML file with several documents separated by --- becomes a JSON array.
  • Strings such as "true" or "123" are quoted in YAML so their type is preserved.
  • Press Ctrl+Enter in an input box to convert immediately.

FAQ

Is YAML a superset of JSON? Practically yes: almost every JSON document is valid YAML 1.2, but YAML adds comments, anchors and a more readable indentation-based syntax.

Are comments kept? No. JSON has no comments, so YAML comments are dropped when converting to JSON.

Is my data uploaded? No. The conversion runs 100% in your browser; nothing is sent to a server.

Related tools

  • Json to Excel/CsvConvert JSON to Excel (XLSX) or CSV online for free. Paste or upload JSON and download a ready-to-use spreadsheet in seconds.
  • JSON to TypeScript, C# & GoFree JSON to TypeScript interface, C# class and Go struct generator. Merges arrays, detects optional fields and nested types. Runs in your browser.
  • Shorten URLShorten long URLs into short, shareable links and get a QR code for each one. Free online URL shortener.
  • Download YoutubeGet direct download links for YouTube videos in the best available qualities (1080p, 720p, 480p). Paste a link and choose a stream.
  • Statistics ParserParse SQL Server SET STATISTICS IO and TIME output into readable tables with totals for logical reads, CPU and elapsed time.
  • Create SitemapEffortlessly create a sitemap for your website by crawling and capturing all URLs with our powerful online sitemap generator. Our tool will crawl through your website, collecting all accessible URLs, and generate a comprehensive sitemap file for easy submission to search engines. With our user-friendly interface and efficient crawling process, you can quickly create a sitemap that ensures better indexing and visibility for your website. Start using our sitemap generator now and improve your website's search engine optimization (SEO) and overall online presence.
@Made by THUTOOL