Split Solidity standard-JSON input into readable source files or flatten them into one.
Loading tool
About Solidity JSON Simplifier
Paste Solidity standard-JSON input, Etherscan's {{ ... }} variant or getsourcecode API response, a { path: source } map, or standard-JSON output, and browse each source file separately. It can flatten all files into one .sol ordered by import dependencies, shows the compiler settings (optimizer and runs, EVM version, viaIR, remappings, libraries), and for standard-JSON output lists each contract with its ABI and bytecode sizes.
Common uses
- Read a verified contract's multi-file source copied from Etherscan
- Flatten a project into a single file for review or verification
- Check which optimizer settings and EVM version a contract was compiled with
- Pull a contract's ABI out of compiler output
FAQ
- What is Solidity standard JSON input?
- It is the JSON format solc accepts with --standard-json: a language field, a sources map of file paths to contents, and a settings object with the optimizer, EVM version, remappings and output selection. Block explorers use it to verify multi-file contracts.
- Why does Etherscan source start with double braces?
- Etherscan stores standard-JSON source wrapped in an extra pair of braces, {{ ... }}. Remove one pair to get valid JSON; this tool does that automatically.
- What does flattening a contract do?
- It combines the contract and every file it imports into one source file, with dependencies first, so it can be read or compiled without the original folder structure.