Outline to JSON

Convert an indented text outline into nested JSON — spaces or tabs set the nesting. Pick a children-array or nested-object shape. Runs entirely in your browser, no server, no sign-up.

JSON

What this tool does

Paste an indented text outline and get back nested JSON — instantly, right in your browser. Nothing is uploaded to a server: it runs locally, works offline, and needs no sign-up. Each non-blank line becomes a node, and the leading whitespace of a line decides where it sits in the tree.

How nesting works

A line that is more indented than the line before it becomes a child of the nearest preceding less-indented line. The same indentation makes lines siblings, and a line that dedents reattaches to the matching ancestor. Both spaces and tabs work, and you can even mix them — set the Tab width to say how many columns a tab counts for (default 4). The depth steps don't have to be uniform: only the relative indentation matters, so a 2-space outline and a 4-space outline both parse correctly.

Blank lines (and whitespace-only lines) are ignored, so you can space your outline out for readability. The first line must not be indented — it's the root.

Output shapes

ShapeOutputGood for
children (default)An array of { "text": …, "children": […] } nodes. Order and duplicate siblings are preserved; a leaf has an empty children array.Faithful tree data, lists with repeated labels, rendering a UI tree.
nestedAn object keyed by each node's text, like { "a": { "b": {} } }. A leaf is an empty object; duplicate sibling keys keep the last.Compact config-style trees, quick lookups by name.

Turn Pretty-print off for compact, single-line JSON.

Examples

Outline:

Project
  Frontend
    UI
  Backend
    API

children output (pretty):

[
  {
    "text": "Project",
    "children": [
      { "text": "Frontend", "children": [ { "text": "UI", "children": [] } ] },
      { "text": "Backend", "children": [ { "text": "API", "children": [] } ] }
    ]
  }
]

nested output:

{ "Project": { "Frontend": { "UI": {} }, "Backend": { "API": {} } } }

FAQ

Is it free and private?

Yes — your outline never leaves your device, and the page keeps working offline once it has loaded.

Can I mix tabs and spaces?

Yes. A tab counts as Tab width columns (default 4), so a tab-indented child still nests correctly under a space-indented parent.

What if my indentation isn't a consistent number of spaces?

That's fine — only the relative indentation between lines matters. A line that is more indented than its predecessor becomes a child no matter the exact step size.

Which output shape should I pick?

Use children when order or repeated labels matter, or when you want explicit text/children fields. Use nested for a compact object tree you can look up by name.

Why did I get an error?

The first line must not be indented (it's the root), and the outline must contain at least one non-blank line.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool outline-to-json "Project
  Frontend
    UI
  Backend
    API"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/outline-to-json/?outline=Project%0A%20%20Frontend%0A%20%20%20%20UI%0A%20%20Backend%0A%20%20%20%20API&format=children&tab_size=4&pretty=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.