# Using a custom Solidity compiler

Description: How to configure Hardhat to use a custom Solidity compiler

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/cookbook/custom-solidity-compiler.mdx

  Components used in this page:
    - :::note: An informational callout block. Supports custom title `:::note[Title]` and icon `:::note{icon="name"}` syntax.

Hardhat supports custom compilers. To use them, you'll need to manually download the compiler binary and reference it in the Solidity settings of your `hardhat.config.ts` file.

:::note
Looking for `slang-solx` (formerly known as `solx`)? It has its own plugin. Read [Compiling with slang-solx](/docs/cookbook/compiling-with-slang-solx) instead.
:::

Configure the path to the custom compiler binary using the `path` property. You can use this property in both the simple and extended formats of the `solidity` property. For example, using the simple format:

```ts
// hardhat.config.ts
import { defineConfig } from "hardhat/config";

export default defineConfig({
  //...
  solidity: {
    version: "0.8.29",
    path: "/path/to/compiler", // Replace with the actual path to the compiler
  },
});
```

Or using the extended format:

```ts
// hardhat.config.ts
import { defineConfig } from "hardhat/config";

export default defineConfig({
  //...
  solidity: {
    compilers: [
      {
        version: "0.8.29",
        path: "/path/to/compiler",
      },
    ],
  },
});
```
