HOCON ↔ JSON

Client

Convert between HOCON configuration text and JSON in your tab—paste on either side, format, and copy. A small JSON example is pre-filled so you can try JSON → HOCON immediately.

Learn more: JSON and HOCON

Exchange Human-Optimized Config Object Notation (HOCON) with JSON—common around JVM stacks for application.conf-style files—without uploading files.

What HOCON is here

HOCON extends JSON ideas with optional braces, `key = value` assignments, comments in many loaders, and sometimes substitutions. This page parses pasted HOCON into plain JSON trees and emits readable HOCON from JSON objects or arrays.

Limits

Full HOCON implementations support includes, URLs, durations, and memory sizes; browser parsers vary. Treat output as structural scaffolding—verify against your runtime after conversion.

Substitution syntax may be interpreted during parsing; paste HOCON only from sources you trust.

JSON & HOCON

?

JSON → HOCON uses JSON.parse then a local serializer that emits HOCON-friendly blocks and assignments. HOCON → JSON uses the hocon-parser package (same-document substitution syntax may run during parse—paste trusted config only).

HOCON is common for JVM and Scala tooling (Typesafe/Lightbend-style configs). For strict tables use TOML ↔ JSON; for flat legacy files use INI ↔ JSON.

Sample JSON is pre-filled—click JSON → HOCON to fill the right panel. Parsing runs in your browser.

Common use cases

  • Translate JVM-friendly HOCON snippets into JSON for APIs, tests, or documentation—or draft HOCON from JSON.
  • Compare Lightbend/Typesafe-style application.conf fragments side by side with JSON equivalents.
  • Normalize pasted HOCON after editing so braces and assignments are easier to review.

Common mistakes to avoid

  • Assuming full HOCON feature parity

    The parser focuses on typical config shapes. Advanced includes, URLs, or duration units may parse differently than your runtime—spot-check critical files.

  • Ignoring substitution syntax

    HOCON supports `${path}` substitutions in many loaders. This parser may resolve same-document references; do not paste untrusted HOCON expecting it to be inert text.

  • Confusing HOCON with JSON or YAML

    HOCON allows optional braces and `=` assignments. For strict tables prefer TOML ↔ JSON; for flat legacy keys prefer INI ↔ JSON.

FAQ

Are files uploaded?

No. Conversion runs in your browser.

Does this fetch remote `.conf` includes?

No. Paste complete HOCON text here—there is no network step for includes or URLs.

Will my HOCON round-trip byte-for-byte?

JSON → HOCON uses a deterministic emitter that may reorder inline objects or spacing. Semantics should match for typical configs; diff before committing.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • hocon to json converter online
  • json to hocon online
  • application.conf to json
  • convert hocon to json in browser

Related utilities you can open in another tab—mostly client-side.