YAPF
YAPF: A flexible Python formatter with strong control over styles, diffs, and scope. Ranked #30 of 34 in Code Formatting Tools by our editors (6.3/10); pricing: Open source; best for teams needing configurable Python formatting.
At a glance
- Editor score6.3 / 10
- PricingOpen source
- Best forTeams needing configurable Python formatting
- Paid fromFree
- Supported languagesPython
- Facts checked21 Sep 2026

Where it wins
- Formats files, directories, line ranges, and changed lines
- Supports PEP 8, Google, YAPF, and Facebook styles
- Includes library APIs, ignore patterns, and editor plugins
Where it doesn't
- Supports Python only
- Verified editor integrations are limited to IntelliJ/PyCharm, IPython, and VS Code
- The project is marked beta in its package metadata
Our verdict on YAPF
YAPF is an open-source command-line and library-based formatter for Python source code. It suits developers and teams that want configurable formatting across individual files, directory trees, selected line ranges, or changed lines from unified diffs. It runs on Windows, macOS, and Linux, and requires Python 3.7 or newer. Developers can also use its FormatCode and FormatFile library APIs when formatting needs to be part of a Python workflow.
Scope control is one of YAPF's clearest strengths. It can format in place, generate unified diffs, run formatting in parallel, and exclude files through .yapfignore or patterns in pyproject.toml. Style configuration covers PEP 8, Google, YAPF, and Facebook options, giving teams a way to align output with an established preference rather than accepting a single fixed format. The yapf-diff tool adds a focused workflow for formatting only changed lines, which can help limit formatting changes in active codebases.
YAPF also fits common Python editing environments through plugins and extensions for IntelliJ/PyCharm, IPython, and Visual Studio Code. Its open-source model and library APIs make it suitable for teams that want to incorporate formatting into their own tooling. The trade-off is focus: it supports Python rather than multiple languages, and its verified editor integration set is narrower than some alternatives. The package metadata marks the project beta, and Google's ownership of the code does not make YAPF an official Google product. Choose YAPF for configurable Python formatting with granular scope control; consider an alternative if broader language coverage or a wider integration ecosystem is a priority.
Your product? Our editors can test YAPF in depth and publish a review, labelled as paid · from $149/mo →
YAPF pricing
YAPF fact sheet
| Free plan | Not verified |
|---|---|
| Paid from | Free |
| Supported languages | Python |
| Supported platforms | Windows, macOS, Linux |
| Editor integration | Yes |
| Ignore files | Yes |
| Changed-lines formatting | Yes |
| Library API | Yes |
| License model | Open_source |
| Deployment | Desktop |
| Platforms | Windows, macOS, Linux |
| Support | Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 3 integrations: IntelliJ/PyCharm, IPython, Visual Studio Code |
| Pricing | Open source |
| Website | github.com |
| Facts checked | 21 Sep 2026 |
YAPF integrations
YAPF lists 3 integrations on its own site.
- IntelliJ/PyCharm
- IPython
- Visual Studio Code
Alternatives to YAPF
- dprintA broad, editor-friendly formatter for multilingual repositories and changed-file workflows.9.4
- PrettierA broad, open-source formatter for web-language teams across editors and workflows.9.2
- SpotlessA build-focused formatter for JVM projects that need broad language coverage and automation.9.0
Used YAPF? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used YAPF for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
YAPF is listed in our Code Formatting Tools directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/yapf/"><img src="https://www.itechguides.com/best/badge/yapf.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update
