Skip to main content

prisma studio

Browse your data with Prisma Studio - a visual database browser.

Usage

prisma studio [options]

Options

--help
boolean
Display help message.Alias: -h
prisma studio --help
--port
number
Port to start Prisma Studio on.Alias: -pDefault: 51212
prisma studio --port 5555
--browser
string
Browser to open Prisma Studio in. Use none to prevent opening a browser.Alias: -bEnvironment variable: BROWSER
prisma studio --browser firefox
prisma studio --browser none
--config
string
Custom path to your Prisma config file.
prisma studio --config=./custom/prisma.config.ts
--url
string
Database connection string. Overrides the URL in your Prisma config file.
prisma studio --url="postgresql://user:password@localhost:5432/mydb"

Examples

Start Studio on default port

prisma studio
Output:
Prisma Studio is running at: http://localhost:51212
Studio automatically opens in your default browser.

Start on custom port

prisma studio --port 5555
Output:
Prisma Studio is running at: http://localhost:5555

Specify a browser

prisma studio --browser firefox
Opens Studio in Firefox instead of the default browser.

Prevent opening browser

prisma studio --browser none
Using environment variable:
BROWSER=none prisma studio
Starts the server but doesn’t open a browser window.

Custom config file

prisma studio --config=./prisma.config.ts

Override database URL

prisma studio --url="postgresql://user:password@localhost:5432/mydb"
Connects to the specified database instead of using the URL from your config file.

Features

Browse Data

  • View all tables/models in your database
  • Paginate through records
  • Sort by any column
  • Filter records with powerful query builders

Edit Data

  • Create new records
  • Update existing records
  • Delete records
  • Edit related records through relations

Relations

  • Navigate through relations
  • Create and link related records
  • View relation counts
  • Disconnect relations

Search and Filter

  • Text search across fields
  • Advanced filtering with multiple conditions
  • Date range filters
  • Boolean filters

Supported Databases

Prisma Studio supports all databases that Prisma supports:
  • PostgreSQL (including Prisma Postgres, Neon, Supabase, etc.)
  • MySQL (including PlanetScale)
  • SQLite (including Turso, Cloudflare D1)
  • SQL Server
  • MongoDB (limited support)

Protocol Support

| Protocol | Support | |----------|---------|| | postgres://, postgresql:// | ✅ Full | | prisma+postgres:// | ✅ Full (Prisma Accelerate) | | mysql:// | ✅ Full | | file: | ✅ Full (SQLite) | | sqlserver:// | ❌ Not supported yet |

Connection Handling

Local SQLite

For SQLite databases, Studio uses:
  1. Node.js built-in sqlite module (Node.js >=22.5)
  2. Falls back to better-sqlite3 (if installed)
  3. Falls back to Deno or Bun SQLite modules (if available)
prisma studio --url="file:./dev.db"

Remote PostgreSQL

prisma studio --url="postgresql://user:password@host:5432/database"

Prisma Accelerate

prisma studio --url="prisma+postgres://accelerate.prisma-data.net/?api_key=YOUR_API_KEY"

Security Considerations

⚠️ Warning: Prisma Studio provides direct database access:
  • Only use on trusted networks
  • Don’t expose Studio ports to the internet
  • Use --browser none in production environments
  • Consider access controls for sensitive data

Port Conflicts

If the default port (51212) is in use, Prisma Studio automatically finds an available port:
Prisma Studio is running at: http://localhost:49876
Or specify a port explicitly:
prisma studio --port 5555

Stopping Studio

To stop Prisma Studio, press Ctrl+C in the terminal where it’s running.

Troubleshooting

Database Connection Errors

If Studio can’t connect to your database:
  1. Verify your connection string is correct
  2. Check that the database server is running
  3. Ensure network connectivity
  4. Verify authentication credentials

Port Already in Use

prisma studio --port 5556
Try a different port if the default is occupied.

Browser Doesn’t Open

Manually navigate to the URL shown in the terminal:
Prisma Studio is running at: http://localhost:51212

Build docs developers (and LLMs) love