Skip to main content
Change page

Smart contract languages

Page last update: February 25, 2026

A great aspect about Ethereum is that smart contracts can be programmed using relatively developer-friendly languages. If you're experienced with Python or any curly-bracket language (opens in a new tab), you can find a language with familiar syntax.

The two most active and maintained languages are:

  • Solidity
  • Vyper

Remix IDE provides a comprehensive development environment for creating and testing contracts in both Solidity and Vyper. Try the in-browser Remix IDE (opens in a new tab) to start coding.

More experienced developers also might want to use Yul, an intermediate language for the Ethereum Virtual Machine, or Yul+, an extension to Yul.

If you're curious and like to help test new languages that are still under heavy development you can experiment with Fe, an emerging smart contract language which is currently still in its infancy.

Prerequisites

Previous knowledge of programming languages, especially of JavaScript or Python, can help you make sense of differences in smart contract languages. We also recommend you understand smart contracts as a concept before digging too deep into the language comparisons. Intro to smart contracts.

Solidity

  • Object-oriented, high-level language for implementing smart contracts.
  • Curly-bracket language that has been most profoundly influenced by C++.
  • Statically typed (the type of a variable is known at compile time).
  • Supports:
    • Inheritance (you can extend other contracts).
    • Libraries (you can create reusable code that you can call from different contracts – like static functions in a static class in other object oriented programming languages).
    • Complex user-defined types.

Example contract

This example should give you a sense of what Solidity contract syntax is like. For a more detailed description of the functions and variables, see the docs (opens in a new tab).

Vyper

  • Pythonic programming language
  • Strong typing
  • Small and understandable compiler code
  • Efficient bytecode generation
  • Deliberately has less features than Solidity with the aim of making contracts more secure and easier to audit. Vyper does not support:
    • Modifiers
    • Inheritance
    • Inline assembly
    • Function overloading
    • Operator overloading
    • Recursive calling
    • Infinite-length loops
    • Binary fixed points

For more information, read the Vyper rationale (opens in a new tab).

Example

This example should give you a sense of what Vyper contract syntax is like. For a more detailed description of the functions and variables, see the docs (opens in a new tab).

Yul and Yul+

If you're new to Ethereum and haven't done any coding with smart contract languages yet, we recommend getting started with Solidity or Vyper. Only look into Yul or Yul+ once you're familiar with smart contract security best practices and the specifics of working with the EVM.

Yul

  • Intermediate language for Ethereum.
  • Supports the EVM and Ewasm (opens in a new tab), an Ethereum flavored WebAssembly, and is designed to be a usable common denominator of both platforms.
  • Good target for high-level optimisation stages that can benefit both EVM and Ewasm platforms equally.

Yul+

  • A low-level, highly efficient extension to Yul.
  • Initially designed for an optimistic rollup contract.
  • Yul+ can be looked at as an experimental upgrade proposal to Yul, adding new features to it.

Example contract

The following simple example implements a power function. It can be compiled using solc --strict-assembly --bin input.yul. The example should be stored in the input.yul file.

If you are already well experienced with smart contracts, a full ERC20 implementation in Yul can be found here (opens in a new tab).

Fe

  • Statically typed language for the Ethereum Virtual Machine (EVM).
  • Inspired by Python and Rust.
  • Aims to be easy to learn -- even for developers who are new to the Ethereum ecosystem.
  • Fe development is still in its early stages, the language had its alpha release in January 2021.

Example contract

The following is a simple contract implemented in Fe.

How to choose

As with any other programming language, it's mostly about choosing the right tool for the right job as well as personal preferences.

Here are a few things to consider if you haven't tried any of the languages yet:

What is great about Solidity?

  • If you are a beginner, there are many tutorials and learning tools out there. See more about that in the Learn by Coding section.
  • Good developer tooling available.
  • Solidity has a big developer community, which means you'll most likely find answers to your questions quite quickly.

What is great about Vyper?

  • Great way to get started for Python devs that want to write smart contracts.
  • Vyper has a smaller number of features which makes it great for quick prototyping of ideas.
  • Vyper aims to be easy to audit and maximally human-readable.

What is great about Yul and Yul+?

  • Simplistic and functional low-level language.
  • Allows to get much closer to raw EVM, which can help to optimize the gas usage of your contracts.

Language comparisons

For comparisons of basic syntax, the contract lifecycle, interfaces, operators, data structures, functions, control flow, and more check out this cheatsheet by Auditless (opens in a new tab)

Further reading

Was this article helpful?