Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

OpenAPI / Swagger Editor & Validator

Paste an API description: see every problem by line, the API reference and curl commands.

Developer No upload Works offline Free, no sign-up

YAML or JSON — OpenAPI 3.0, 3.1, 3.2 or Swagger 2.0. Checked as you type; nothing leaves this browser.

Paste or open an API description to check it.

    Next steps

    About the OpenAPI / Swagger Editor & Validator

    Paste or open an OpenAPI 3.0, 3.1 or 3.2 document — or a Swagger 2.0 one — in YAML or JSON. It is checked as you type against the official JSON Schema of its version from spec.openapis.org, plus the rules a schema cannot express: references that point nowhere, duplicate operationIds, path parameters missing from the path (or the path template missing a parameter), duplicate parameters, paths that differ only in parameter names, unknown security schemes and scopes, server variables, required properties that do not exist and more. Every problem has its line, and a click selects it in the editor.

    The Reference view renders the API: operations grouped by tag with parameters, request bodies, responses and schema trees, an example payload generated from each schema, and a ready-to-run curl command. Convert turns YAML into JSON and back, and upgrades Swagger 2.0 or OpenAPI 3.0 to OpenAPI 3.1. Everything happens in your browser.

    How to use it

    1. Paste the document, open a .yaml or .json file, or load the OpenAPI 3.1 or Swagger 2.0 sample.
    2. Read Problems: errors (the document is invalid), warnings (likely mistakes) and notes such as unused schemas, each with its line. Click Line N to jump to it.
    3. Open Reference and expand an operation to see its parameters, request body, responses, examples and a curl command you can copy. Use the search box to find an operation or schema.
    4. Use Convert to get the JSON or YAML version, or Upgrade to OpenAPI 3.1, then Use in editor to check the result.

    Examples

    A path parameter that is not declared
    Input
    paths:
      /loans/{loanId}/return:
        post:
          responses:
            "200": { description: Returned }
    Result
    Error: POST /loans/{loanId}/return: the path parameter {loanId} is not declared. Add a parameter with name: loanId, in: path and required: true.
    A typo in a reference
    Input
    schema:
      $ref: "#/components/schemas/NewLon"
    Result
    Error: "$ref": "#/components/schemas/NewLon" points to nothing in this document. Did you mean "#/components/schemas/NewLoan"?
    A Swagger 2.0 query parameter upgraded to OpenAPI 3.1
    Input
    - name: lang
      in: query
      type: string
      enum: [en, hi, ta]
      default: en
    Result
    - name: lang
      in: query
      schema:
        type: string
        enum: [en, hi, ta]
        default: en

    Types move into schema, x-nullable becomes a "null" type, body and formData parameters become requestBody, and definitions move to components.schemas — with every $ref rewritten.

    Common uses

    • Checking an API description before publishing it, or in review, without installing a linter.
    • Reading an unfamiliar API: what each operation takes and returns, with example payloads.
    • Getting a curl command for an endpoint to try it from a terminal (or paste it into the REST API Tester).
    • Moving an old Swagger 2.0 description to OpenAPI 3.1.

    What is checked

    • Syntax: YAML or JSON errors with the exact position; duplicate keys; a document that is not one mapping.
    • The version: openapi: 3.1 written without quotes or a patch number is read as a number, which is the most common reason a document “has no version”.
    • The official schema of the version: Swagger 2.0 (2017-08-27), OpenAPI 3.0 (2024-10-18), 3.1 (2026-08-03) and 3.2 (2026-08-30), the current editions on spec.openapis.org. Swagger 2.0 parameters are checked against the schema for their in, so a query parameter is not reported as a broken body parameter.
    • Rules beyond the schema: local $refs that resolve to nothing (with a “did you mean”), unique operationIds, path templates and their in: path parameters (which must be required: true), duplicate parameters, paths such as /users/{id} and /users/{name} that a server cannot tell apart, security requirements naming undefined schemes or OAuth scopes, server URL variables and their enums, required properties that do not exist, discriminator mappings, examples of the wrong type, nullable in 3.1 (where it is ignored), request bodies on GET and HEAD, and Swagger 2.0’s one-body-parameter rule.
    • Notes: schemas, parameters, responses and request bodies that nothing uses; tags that are used but not described.

    Examples and curl commands

    Each schema gets an example built from its example, examples, default or enum, otherwise from its type: date-time, email, UUID and other formats get realistic values, numbers respect minimum, maximum and multipleOf, allOf parts are merged and readOnly properties are left out of requests (writeOnly ones out of responses). The curl command uses the first server (with its variables’ defaults), example values for path and query parameters, the operation’s security as shell variables such as $TOKEN or $API_KEY, and a JSON, form or multipart body. Parameters the description gives no example for stay as {placeholders}.

    Upgrading to OpenAPI 3.1

    Swagger 2.0: host, basePath and schemes become servers; definitions, reusable parameters and responses and securityDefinitions move into components (basic auth becomes HTTP basic, OAuth flows are renamed: application → clientCredentials, accessCode → authorizationCode); body and formData parameters become a requestBody with the consumes media types; response schemas and examples move into content with the produces types; parameter types move into schema, and collectionFormat becomes style / explode. OpenAPI 3.0: nullable becomes a "null" type, boolean exclusiveMinimum / exclusiveMaximum become numbers, and example in schemas becomes examples. Key order and number literals are kept exactly. The notes list what needs a human decision.

    Limitations

    • References to other files or URLs ($ref: ./schemas/pet.yaml) are not loaded; they are listed, and only references inside the document are resolved.
    • In OpenAPI 3.1 and 3.2, the official schema leaves Schema Objects open (any JSON Schema dialect is allowed), so keywords inside schemas are only checked by the rules listed above.
    • Descriptions are shown as plain text; Markdown formatting is not rendered.
    • Requests are not sent from this page — copy the curl command, or use the REST API Tester.
    • Upgrading to 3.2 is not offered: 3.1 documents are valid starting points for 3.2 tooling.

    Privacy

    Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

    Frequently asked questions

    Is my API description uploaded?

    No. Parsing, validation, the reference view and the conversions all run in your browser, in a background worker, with the schemas bundled in the page. It works offline once loaded.

    Why does it say my openapi version was read as a number?

    In YAML, openapi: 3.1 is the number 3.1, not the string "3.1.0". The version must be a string with a patch number: openapi: 3.1.2 works (YAML reads it as text because of the second dot), and so does openapi: "3.0.4".

    What is the difference between OpenAPI 3.0 and 3.1?

    OpenAPI 3.1 uses full JSON Schema 2020-12 for schemas: nullable is replaced by type: [string, "null"], exclusiveMinimum is a number, examples is a list, webhooks were added and paths became optional. The Upgrade to OpenAPI 3.1 button makes those changes for you.

    Does it support Swagger 2.0?

    Yes — Swagger 2.0 documents are validated against the Swagger 2.0 schema with the same extra rules, rendered in the reference view, and can be upgraded to OpenAPI 3.1.

    Why are some problems only notes?

    Unused components and undescribed tags do not make a document invalid; they are listed so you can tidy up. Errors make the document invalid, and warnings are very likely mistakes (a required property that does not exist, a scope that is not defined).

    Quick answers and tool search

    Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.