Skip to content
Open HTML files privately on iOS.OpenHTML
All articles

How to View JSON, XML and Source Code Files on iPhone

Updated 2026-08-09

An API response someone sent you, a config file, an exported dataset, a stylesheet — iOS shows them all as unformatted text walls, if it opens them at all. A code-aware viewer fixes that: syntax highlighting, line numbers, search, and proper handling of large files.

OpenHTML opens the whole text-based family — JSON, XML, HTML source, CSS, JavaScript, SVG, YAML, plain text and more — alongside its rendered-page abilities. One app for both "show me the page" and "show me the code".

JSON: readable structure instead of a text wall

  • Share any .json file to OpenHTML — it opens highlighted and indented for reading.
  • Search jumps to keys and values instantly, with line numbers for referencing.
  • Adjust text size per document for dense payloads.

XML: from feeds to configs

RSS feeds, plist-style exports, sitemaps, API responses — XML opens with tag-aware highlighting and search. Malformed or oddly encoded files don't crash the viewer: OpenHTML detects legacy encodings (GB18030, Shift-JIS, Windows-1252…) automatically and tells you which one it used.

Source code: CSS, JS, SVG, YAML and friends

  • Stylesheets and scripts open with language-aware highlighting — useful for reviewing a snippet from a repo or checking what a page's JS actually does.
  • SVG files can be viewed as source — or rendered as the image they are.
  • YAML configs, logs, and plain text files all get the same treatment: highlighting where applicable, search and line numbers everywhere.

Everything opens offline in the app's private storage — no accounts, no analytics, no uploads. Sensitive configs and API dumps stay on your device.

When the file is part of something bigger

A JSON or CSS file often belongs to a web project. Import the whole folder or ZIP instead of the single file and OpenHTML keeps the structure: the page renders with its data and styles, and every individual file remains readable in the source viewer. See running ZIP web projects on iPhone.

Pages that load JSON at runtime via fetch() need a real origin to work — that's what Local Server mode (Pro) provides, entirely on-device.

Related reading

Free on the App Store — core viewing needs no purchase.

Download OpenHTML