<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/sql-js-is-a-javascript-sql-database-it-allows-you-to-create-a-relational-database-and-query-it-en-vsrf4gcpb" -->

---
title: _sql.js_ is a javascript SQL database. It allows you to...
description: sql.js is a JavaScript library that compiles SQLite to WebAssembly (or asm.js for older browsers) using Emscripten, enabling full relational database...
canonical: https://daily.dev/posts/sql-js-is-a-javascript-sql-database-it-allows-you-to-create-a-relational-database-and-query-it-en-vsrf4gcpb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: _sql.js_ is a javascript SQL database. It allows you to create a relational database and query it entirely in the browser.

It uses in memory database, however, it allows you to import any existing sqlite file, and to export it as a JS typed library. | daily.dev
og:description: sql.js is a JavaScript library that compiles SQLite to WebAssembly (or asm.js for older browsers) using Emscripten, enabling full relational database...
og:url: https://daily.dev/posts/sql-js-is-a-javascript-sql-database-it-allows-you-to-create-a-relational-database-and-query-it-en-vsrf4gcpb
og:image: https://api.daily.dev/og/posts/vSRf4gCpb.png
og:image:alt: _sql.js_ is a javascript SQL database. It allows you to create a relational database and query it entirely in the browser.

It uses in memory database, however, it allows you to import any existing sqlite file, and to export it as a JS typed library.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# _sql.js_ is a javascript SQL database. It allows you to create a relational database and query it entirely in the browser.

It uses in memory database, however, it allows you to import any existing sqlite file, and to export it as a JS typed library.

**[Alexey Zerkalenkov](https://daily.dev/sources/tzhsbevyajhcmr0fmoxfj)** · [@alexeyzerkalenkov](https://daily.dev/alexeyzerkalenkov) · 4 upvotes · 0 comments

## Summary

sql.js is a JavaScript library that compiles SQLite to WebAssembly (or asm.js for older browsers) using Emscripten, enabling full relational database functionality entirely in the browser. It runs an in-memory SQLite database with no persistence by default, but supports importing existing .sqlite files and exporting the database as a Uint8Array. The library covers usage in browsers, Node.js, and Web Workers, with code examples for creating tables, running queries, binding parameters, defining custom JS functions and aggregates, loading databases from files or servers via fetch/XHR, and enabling BigInt support. It also documents migration from the synchronous 0.x (asm.js) API to the async 1.x (WebAssembly) API.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://sql.js.org>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#webassembly](https://daily.dev/tags/webassembly), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/sql-js-is-a-javascript-sql-database-it-allows-you-to-create-a-relational-database-and-query-it-en-vsrf4gcpb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/sql-js-is-a-javascript-sql-database-it-allows-you-to-create-a-relational-database-and-query-it-en-vsrf4gcpb","headline":"_sql.js_ is a javascript SQL database. It allows you to create a relational database and query it entirely in the browser.\n\nIt uses in memory database, however, it allows you to import any existing sqlite file, and to export it as a JS typed library.","text":"Shared: sql.js","url":"https://daily.dev/posts/sql-js-is-a-javascript-sql-database-it-allows-you-to-create-a-relational-database-and-query-it-en-vsrf4gcpb","datePublished":"2026-02-18T07:33:31.033Z","dateModified":"2026-02-18T07:34:16.976Z","author":{"@type":"Person","name":"Alexey Zerkalenkov","url":"https://daily.dev/alexeyzerkalenkov","image":"https://lh3.googleusercontent.com/a/ACg8ocKQBwPwaHC4XrPy0rniDybogCxlwDp7QCLkbwsqNRQSFhqDIlIf=s96-c","description":"Fullstack AI Engineer","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":8510}},"image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/OfumYT8KW"},"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/tzhsbevyajhcmr0fmoxfj","name":"Alexey Zerkalenkov"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Alexey Zerkalenkov","item":"https://daily.dev/sources/tzhsbevyajhcmr0fmoxfj"},{"@type":"ListItem","position":3,"name":"_sql.js_ is a javascript SQL database. It allows you to create a relational database and query it entirely in the browser.\n\nIt uses in memory database, however, it allows you to import any existing sqlite file, and to export it as a JS typed library."}]}
```

