A web extension that helps you view JSON documents in the browser. http://jsonview.com
  • TypeScript 67.8%
  • JavaScript 23%
  • CSS 6.5%
  • Shell 2.7%
Find a file
2025-05-16 17:28:45 -07:00
.github Switch to pnpm 2024-06-15 16:00:02 -07:00
.vscode Fixed a regression where floating-point numbers were truncated to integers. 2024-06-19 11:12:31 -07:00
artwork Updates for chrome store 2018-05-13 00:35:49 -07:00
data Reorganize repo, make things mostly work in Chrome 2018-05-07 23:24:52 -07:00
src Version 3.2.0 2025-05-16 17:28:45 -07:00
tests Fix XSS vulnerability in Firefox 2023-12-16 21:35:50 -08:00
.gitignore Start transitioning to manifest v3 2024-06-15 15:47:26 -07:00
.nvmrc Switch to pnpm 2024-06-15 16:00:02 -07:00
.prettierrc Modernize build tools 2023-05-03 11:13:51 -07:00
build.sh Pretty much works with v3 now 2024-06-15 17:45:39 -07:00
CHANGELOG.md Version 3.2.0 2025-05-16 17:28:45 -07:00
CONTRIBUTING.md Ignore pages that are not main_frame loads 2025-01-13 22:28:32 -08:00
eslint.config.js Update to eslint v9 2024-06-15 16:21:46 -07:00
license.txt DOS to UNIX 2011-07-10 22:10:42 -07:00
package.json Version 3.2.0 2025-05-16 17:28:45 -07:00
pnpm-lock.yaml Dependency upgrades 2025-01-13 22:29:44 -08:00
README.md Ignore pages that are not main_frame loads 2025-01-13 22:28:32 -08:00
tsconfig.json Build tweaks 2024-06-15 16:29:53 -07:00

JSONView

JSONView is a Web extension compatible with Firefox and Google Chrome that helps you view JSON documents in the browser.

Normally, when encountering a JSON document (content type application/json), Firefox simply prompts you to download the view. With the JSONView extension, JSON documents are shown in the browser similar to how XML documents are shown. The document is formatted, highlighted, and arrays and objects can be collapsed. Even if the JSON document contains errors, JSONView will still show the raw text.

Once you've got JSONView installed, check out this example JSON file to see the extension in action!

If you'd like to contribute to JSONView but don't want to code, consider contributing a translation. Copy the existing localization files from src/_locale and fill them in for your own language, then send a pull request. You can do it all from the GitHub interface. There are not many strings to translate!

Keyboard Shortcuts

  • Left Arrow - Collapses the json on key up
  • Right Arrow - Expands the json on key up

Reporting Issues

Use the GitHub Issue tracker for JSONView to file issues. Pull requests are especially welcome.

Developing JSONView

Before contributing to JSONView, make sure to read the Contributing Guidelines. I appreciate contributions people make to JSONView, but the goal of the extension is to be simple and straightforward, so I frequently reject contributions that add complexity or unnecessary features. Please consider filing an issue before doing any work, so you don't waste time on something I won't accept.

  • Install NodeJS and run corepack enable.
  • Check out jsonview.
  • Run pnpm i inside the jsonview repository.
  • Run pnpm start to build the extension.
  • In Firefox, go to about:debugging#addons in the address bar, check "Enable add-on debugging", select "Load Temporary Add-on", and choose the jsonview/build-firefox/manifest.json file.
  • In Chrome, Edge, etc., go to edge://extensions/, in the address bar, enable "Developer mode", select "Load Unpacked", and choose the jsonview/build-chrome folder.
  • Run pnpm tests to start a little webserver that serves all the JSON files in ./tests.

JSONView makes use of TypeScript. I recommend VSCode for editing the code - it will automatically prompt to install the correct extensions, and will highlight errors. All of the code that makes up the extension itself are in src/.

Common Issues

  • JSONView isn't displaying my file as JSON: You are probably not serving the JSON with the "application/json" MIME type.
  • Opening a local .json file uses the Firefox default JSON viewer: You need to disable the built-in JSON viewer to use JSONView. Go to "about:config" and set "devtools.jsonview.enabled" to "false".

JSONView is open source software under the MIT license.

Publishing

pnpm start

jsonview-chrome.zip and jsonview-firefox.zip can then be manually uploaded to the extension sites.