# Extract interface

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

> **TL;DR**
> `Refactor | Extract | Interface`

With the Extract Interface refactoring, you can create an interface that is based on the selected type. The Extract Interface dialog displays a list of methods and specifications that you can use to create new method specifications.

Procedure: Extract an interface

1. Place the caret at a type, an interface, or a method that you want to use as a base for a new interface.

2. Select `Refactor | Extract | Interface`.

3. In the Extract Interface dialog, select members that you want to extract along with the interface.

4. Specify the extract location in To directory, To file, and To package fields.

5. Click Refactor.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/go_extract_interface.mp4)

> **Note:**
> To enable the Preview button, clear at least one checkbox of any method whose visibility is going to be changed (the Exported column).

## See also

### Reference

[Extract Interface dialog](extract-interface-dialog.html)

### External Links

[The Extract Interface and Extract Superclass refactorings for Flex and ActionScript](http://blogs.jetbrains.com/idea/2010/09/extract-interface-and-extract-superclass-refactorings-for-actionscriptflex/#more-3445)

