.sol

How to open a .sol file

Quick, free ways to open Solidity on any system.

A .sol file is a Solidity Smart Contract Source File. If double-clicking does nothing, your computer simply does not have an app that reads Solidity yet. Here is how to fix that on each operating system, using free software wherever possible.

Open a .sol file step by step

  1. Confirm the file really is a .sol. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
  2. On Windows, open it with VS Code (Solidity extension) or Remix IDE (browser).
  3. On Mac, use VS Code (Solidity extension) or Remix IDE (browser).
  4. On Linux, try VS Code (Solidity extension) or Remix IDE (browser).
  5. Still stuck? Convert the .sol to EVM bytecode, which opens more widely.

Best apps to open .sol files

Windows

  • VS Code (Solidity extension)
  • Remix IDE (browser)
  • any text editor

macOS

  • VS Code (Solidity extension)
  • Remix IDE (browser)
  • any text editor

Linux

  • VS Code (Solidity extension)
  • Remix IDE (browser)
  • any text editor
!
Before you open it: Caution. A .sol file is source code for contracts that can move funds once deployed. Reading it is safe; deploying or interacting with unaudited contracts is the real risk.

Frequently asked questions

Why can't I open my .sol file?

Almost always because no installed app understands Solidity. Install one of the apps above, or convert the file to a format your existing software already reads.

How do I open a .sol file?

Any text editor shows the source. To compile and test it, use the Remix IDE in a browser or a framework such as Hardhat or Foundry.

What does a .sol file become when compiled?

EVM bytecode plus an ABI (a JSON description of the contract's functions). The bytecode is deployed to the blockchain; apps use the ABI to call it.

Learn more about .sol