SurrealDB Online Compiler / Query Runner

Write, test, and execute SurrealQL queries online directly from your browser with our free Online SurrealDB Compiler / Query Runner. SurrealQL uses familiar SQL-like syntax while adding support for record IDs, nested document fields, graph relationships, and other SurrealDB-specific data patterns.

How to Use This SurrealDB Compiler

  1. Write or paste your SurrealQL query
    Enter your query in the Code Editor. You can practice CREATE, SELECT, UPDATE, DELETE, document-style records, nested fields, and supported graph relationships.
  2. Click the Run button
    Select Run to execute your SurrealQL code. If the query contains invalid syntax or another execution issue, review the returned message, update the query, and run it again.
  3. Check the Output screen
    Query results and execution messages appear in the Output panel. Use the available controls to copy, download, or delete the output before testing another query.

Key Features

  • Free Online SurrealQL Runner: Write and execute SurrealDB queries directly from a modern browser.
  • Zero Installation: Practice supported queries without installing a local SurrealDB instance or configuring Docker.
  • SQL-Like Query Syntax: SurrealQL resembles traditional SQL while extending it with nested fields, record IDs, graph edges, and other database-specific constructs.
  • Document Data Support: Work with records containing fields, nested objects, arrays, and flexible document structures.
  • Graph Relationships: Create and query relationships between records using SurrealDB’s graph model and RELATE syntax.
  • Instant Query Execution: Click Run and quickly review returned records or query errors.
  • Dark and Light Mode: Switch the Code Editor theme for comfortable database development.
  • Output Controls: Copy, download, or clear generated results directly from the Output panel.
1. How do I run a basic SELECT query in this online SurrealDB compiler?

SurrealQL provides SQL-like SELECT syntax for querying tables and records.

For example:

To retrieve selected fields:

You can also apply filtering and ordering:

Enter your query in the Code Editor, click Run, and review the returned records in the Output screen.

SurrealQL is SurrealDB’s query language. Its syntax is broadly SQL-like, but it adds native concepts such as nested fields, record IDs, graph edges, record links, arrays, objects, and graph traversal.

A simple document-style record can contain nested data:

You can then query a nested field:

SurrealDB’s document model supports self-describing records with nested objects and arrays, rather than requiring every use case to be represented only through traditional normalized tables.

No. For the supported exercises available in this Online SurrealDB Compiler / Query Runner, you can write and execute queries directly from the browser without configuring a local SurrealDB installation or Docker environment.

A full SurrealDB deployment may still be needed when you want persistent production data, application connections, authentication, deployment configuration, distributed operation, or other advanced database features. SurrealDB itself supports multiple deployment models ranging from embedded environments to distributed deployments.

Yes, where those SurrealQL features are enabled by the online environment. SurrealDB supports document-style records as well as graph relations, and graph edges can be created with the RELATE statement.

Create two records:

Create a relationship between them:

You can also store information on the relationship itself:

SurrealDB treats graph edges as records, which means relationship data can carry its own fields and metadata.

A graph traversal can then follow the relationship:

SurrealQL uses arrow syntax for graph traversal, making the editor useful for practicing document databases, connected records, graph relationships, and modern multi-model database concepts.