Anúncios incomodam? Ir Sem anúncios Hoje

Formatador de Esquema Prisma

DadosDesenvolvedor
ANÚNCIO · REMOVER?

Ou
ANÚNCIO · REMOVER?

Guia

Prisma Schema Formatter

Formatador de Esquema Prisma

Format your Prisma schema files instantly with proper indentation, column-aligned fields, and consistent styling. This tool applies the same formatting conventions as prisma format — aligning field names, types, and attributes into clean columns — entirely in your browser. Paste messy or inconsistent .prisma schemas and get clean, readable output in one click.

Como usar

Paste your Prisma schema into the input area or upload a .prisma file directly. The formatter instantly parses your schema and applies consistent formatting. You can optionally enable field sorting — alphabetical or grouped by type — to further organize your models. The formatted output appears with syntax highlighting, ready to copy back into your project.

Características

  • Column-Aligned Formatting – Aligns field names, types, and attributes into neat columns, matching the style of prisma format
  • Suporte Completo a Blocos – Handles datasource, generator, model, enum, view, and type blocks correctly
  • Ordenação de Campos – Optionally sort fields alphabetically or group them by type (relations, scalars, etc.)
  • Preservação de Comentários – Keeps your inline and block comments intact during formatting
  • Realce de Sintaxe – Color-coded output for models, fields, types, directives, and comments
  • Directive Support – Correctly handles @id, @unique, @default, @relation, @map, @db, @@map, @@index, and all other Prisma attributes
  • Upload de arquivo – Drag and drop or browse to upload .prisma files directly

ANÚNCIO · REMOVER?

Perguntas frequentes

  1. What is Prisma schema formatting and why does it matter?

    Prisma schema formatting ensures consistent indentation, column alignment of field types and attributes, and proper block structure in your .prisma files. Consistent formatting improves readability across teams, reduces merge conflicts in version control, and makes it easier to spot errors in model definitions. The official prisma format command applies these conventions, and this tool replicates that behavior in the browser.

  2. How does column alignment work in Prisma schemas?

    Column alignment arranges the three main parts of each field definition — the field name, the type, and the attributes — into vertically aligned columns. For example, in a User model, the id, email, and name fields would have their Int, String types aligned in the same column, and their @id, @unique directives aligned in another. This makes schemas much easier to scan visually.

  3. What block types does a Prisma schema support?

    A Prisma schema can contain several block types: datasource (database connection config), generator (code generation config), model (database table definitions), enum (enumerated types), view (database view definitions), and type (composite types for MongoDB). Each block type has its own syntax rules for the fields and attributes it can contain.

  4. What is the difference between field-level and block-level attributes in Prisma?

    Field-level attributes (prefixed with single @) apply to individual fields — like @id for primary keys, @unique for unique constraints, @default for default values, and @relation for foreign key relationships. Block-level attributes (prefixed with @@) apply to the entire model — like @@index for composite indexes, @@unique for composite unique constraints, @@map for custom table names, and @@id for composite primary keys.

Quer eliminar anúncios? Fique sem anúncios hoje mesmo

Instale nossas extensões

Adicione ferramentas de IO ao seu navegador favorito para acesso instantâneo e pesquisa mais rápida

Ao Extensão do Chrome Ao Extensão de Borda Ao Extensão Firefox Ao Extensão Opera

O placar chegou!

Placar é uma forma divertida de acompanhar seus jogos, todos os dados são armazenados em seu navegador. Mais recursos serão lançados em breve!

ANÚNCIO · REMOVER?
ANÚNCIO · REMOVER?
ANÚNCIO · REMOVER?

Notícias com destaques técnicos

Envolver-se

Ajude-nos a continuar fornecendo ferramentas gratuitas valiosas

Compre-me um café
ANÚNCIO · REMOVER?