> Full SurrealDB documentation index: https://surrealdb.com/docs/llms.txt

# Embedding SurrealDB

How to embed SurrealDB into your application. Detailed instructions for each supported programming language.

Instead of connecting to a remote server, you can run SurrealDB directly inside your application process. Embedded mode gives you the full query engine with no network overhead, which is useful for local-first applications, edge deployments, and testing.

## Embedding languages

The following languages are supported:

- [.NET](/docs/build/embedding/by-language/dotnet.md)
- [Go](/docs/build/embedding/by-language/golang.md)
- [JavaScript](/docs/build/embedding/by-language/javascript.md)
- [Python](/docs/build/embedding/by-language/python.md)
- [Rust](/docs/build/embedding/by-language/rust.md)

The [Swift](/docs/reference/swift.md) and [Kotlin](/docs/reference/kotlin.md) SDKs, which cover iOS and Android apps, connect to a SurrealDB server over HTTP or WebSocket, and do not run a database inside the app.

## Browser embedding options

When embedding SurrealDB in web browsers, you have two options:

- **IndexedDB**: SurrealDB can be configured to use IndexedDB to store and persist data within the web browser. SurrealDB first serialises both keys and values into a Uint8Array and uses IndexedDB as a binary key-value store. This gives good performance, and all of the functionality that SurrealDB offers when it runs in other ways.

- **SDK**: Alternatively, you can use the SurrealDB SDK to connect to a remote SurrealDB instance instead of using IndexedDB for local persistence.

Embedding in a browser uses the JavaScript SDK's [WebAssembly engine](/docs/reference/javascript/engines/wasm.md) (`@surrealdb/wasm`). It connects with `mem://` for an in-memory database or `indxdb://` for IndexedDB persistence, and can run inside a Web Worker so that queries do not block the page. [Embedded engines](/docs/reference/javascript/concepts/embedded-engines.md#running-in-a-web-worker) shows both setups.

## Storage

- [Storage engines](/docs/build/embedding/storage-engines.md) - which engine an embedded database can use, and what each gives up
