Instead of Swagger UI: Scalar
Use Scalar for new API reference pages. It renders the same OpenAPI document as Swagger UI, adds a built-in API client and generated code examples, and has ready-made integrations for most server frameworks. Microsoft's ASP.NET Core documentation now includes a guide to using it with the framework's built-in OpenAPI support.
Both are for publishing interactive API reference documentation from an OpenAPI file.
Why Scalar is better
- Readers can send real requests from the page, because Scalar's reference comes with an API testing tool that has environment variables and dynamic parameters.
- It generates code examples for each operation in many languages and frameworks.
- Setup can be a single HTML file that loads Scalar from a CDN with no build step, and there are integrations for ASP.NET Core, FastAPI, Express, Hono, Django, Docusaurus and others.
- The same project ships a free, open-source, offline-first desktop API client built around OpenAPI, so documentation and testing share one source file.
When to keep Swagger UI
Keep Swagger UI if it already does what you need or your framework ships it by default, as FastAPI does at /docs. It is the long-standing reference viewer from the Swagger project, Apache-2.0 licensed, and familiar to most API consumers.
Switching
Usually a small change. Point Scalar at the same OpenAPI JSON or YAML URL that Swagger UI uses, through a framework integration or a single HTML page, and remove the Swagger UI package. In ASP.NET Core that means the Scalar.AspNetCore package and one call to app.MapScalarApiReference(). Swagger UI plugins and custom CSS need redoing with Scalar's configuration and themes.
Watch out
Scalar is developed by one company, also called Scalar, rather than a foundation, so its roadmap follows that company's priorities. Any interactive OpenAPI page exposes your API surface, and Microsoft advises enabling Swagger UI, ReDoc or Scalar only in development unless the docs are meant to be public.
Also worth a look
- Redoc An open-source renderer for read-only, three-panel OpenAPI reference pages; pick it when you want polished docs without a built-in request runner.
More newer, better API clients and testing tools
Sources
Judged on 2026-11-06. See every API clients and testing tools, or all 66 replacements.