01What is Data Type Mapper?
Moving a schema from one database to another tends to stall on small type questions. What does BYTEA become in SQL Server? Where does a UUID go in MySQL? This mapper is a lookup table for those questions. It holds 29 common column types, each mapped across PostgreSQL, MySQL, SQLite, MS SQL Server and Oracle. You pick a Source and a Target dialect, and the table lists the generic type name with the source and target spellings side by side. A counter above the table tells you how many types are shown. Copy exports every visible row as a line like UUID: UUID → CHAR(36). The coverage goes past integers and strings. SERIAL and BIGSERIAL become AUTO_INCREMENT columns in MySQL, IDENTITY(1,1) in SQL Server and GENERATED ALWAYS AS IDENTITY in Oracle. UUID maps to CHAR(36), UNIQUEIDENTIFIER or RAW(16). JSONB falls back to JSON, NVARCHAR(MAX) or CLOB. PostgreSQL-only types such as INET, CIDR, MACADDR, INTERVAL, MONEY and arrays get the closest practical stand-in, often a sized VARCHAR or a JSON column. Search is forgiving. It uppercases your input and strips anything in brackets, so VARCHAR(255) searches for VARCHAR. It then matches both the generic name and every dialect spelling. That means BYTEA finds the BLOB row and DATETIME2 finds TIMESTAMP. The catch is that it is a substring match. Searching TIME returns TIME, TIMESTAMP and TIMESTAMPTZ, and VARCHAR(255) returns ten rows because VARCHAR also appears inside NVARCHAR(MAX) and VARCHAR2(45). A worked example: set Source to postgresql, Target to oracle and type time. You get three rows. TIME maps to INTERVAL DAY(0) TO SECOND, because Oracle has no plain TIME type. TIMESTAMP stays TIMESTAMP, and TIMESTAMPTZ becomes TIMESTAMP WITH TIME ZONE. Know what this table is and isn't. It is a fixed, hand-maintained reference that lives in the page itself, so your searches never leave the browser. It does not read a CREATE TABLE statement or convert DDL. Some cells are approximations. SQLite stores values by type affinity, as its own docs describe, so most rows collapse to INTEGER, REAL or TEXT. MySQL TEXT holds up to 65,535 bytes, while PostgreSQL TEXT has no such small cap. MySQL DATETIME keeps no time zone. Check precision, length limits and time-zone handling for the columns you care about before moving real data.
Backend developers, database administrators, data engineers moving tables between systems and ORM users writing cross-database migrations. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Data Type Mapper
- Choose the Source dialect you are coming from.
- Choose the Target dialect you are moving to.
- Type into Search Type, such as UUID or VARCHAR(255), or leave it empty to list all 29 types.
- Read the matching rows. The count above the table shows how many types are shown.
- Click Copy to copy the rows as text, or the reset button to clear the search.
03Worked examples
- Input:
Search: uuid, Source: postgresql, Target: mysql - Result:
UUID: UUID → CHAR(36) - MySQL has no UUID column type, so the mapping stores the 36-character text form.
- Input:
Search: BYTEA, Source: postgresql, Target: mssql - Result:
BLOB: BYTEA → VARBINARY(MAX) - The search also matches dialect-specific names, so BYTEA finds the generic BLOB row.
- Input:
Search: serial, Source: postgresql, Target: sqlite - Result:
SERIAL: SERIAL → INTEGER PRIMARY KEY AUTOINCREMENT BIGSERIAL: BIGSERIAL → INTEGER PRIMARY KEY AUTOINCREMENT - Input:
Search: timestamptz, Source: postgresql, Target: mysql - Result:
TIMESTAMPTZ: TIMESTAMPTZ → DATETIME - The MySQL side has no time zone, so store values in UTC or keep the offset in another column.
- Input:
Search: varchar(255), Source: mysql, Target: oracle - Result:
VARCHAR: VARCHAR(n) → VARCHAR2(n) TEXT: TEXT → CLOB JSON: JSON → CLOB … - The length in brackets is ignored, and VARCHAR also matches rows whose mappings contain it (like NVARCHAR(MAX)), so you get more than one row.
- Input:
Search: time, Source: postgresql, Target: oracle - Result:
TIME: TIME → INTERVAL DAY(0) TO SECOND TIMESTAMP: TIMESTAMP → TIMESTAMP TIMESTAMPTZ: TIMESTAMPTZ → TIMESTAMP WITH TIME ZONE - A substring search, so TIME also finds the two TIMESTAMP rows. Oracle has no plain TIME type, so an interval is used.
04Common use cases
- Porting a PostgreSQL schema to MySQL for a client whose hosting only offers MySQL
- Writing Prisma, Knex or TypeORM migrations that must run on SQLite in tests and Postgres in production
- Choosing how to store UUIDs and JSON when moving a Django app to SQL Server
- Reviewing an Oracle to PostgreSQL migration plan for type mismatches
- Finding a replacement for PostgreSQL INET or MACADDR columns on a database without network types
- Checking what a SERIAL primary key should become before rewriting DDL by hand
05Tips
- Search for the spelling you actually have, like BYTEA or DATETIME2. The tool finds the generic row that contains it.
- Short searches match inside longer names, so INT also hits BIGINT, SMALLINT and INTERVAL. Type the full name to narrow it.
- MySQL DATETIME has no time zone. Convert values to UTC when mapping from PostgreSQL TIMESTAMPTZ.
- Placeholders like (p,s) and (n) are yours to fill. Keep the original precision when you convert DECIMAL.
- Oracle RAW(16) stores a UUID as 16 bytes, so your app must convert between that and the usual 36-character text form.
06Related concepts
SQL dialects, Schema migration, Column types, Type affinity, Database portability.
Frequently Asked Questions
What is Data Type Mapper?
Data Type Mapper is a free, browser-based developer tool on AIDToolStack. Map types across SQL dialects It requires no installation or sign-up and works entirely in your browser.
Is Data Type Mapper free to use?
Yes. No sign-up, no fees and no usage cap.
Does Data Type Mapper store my data?
No. It runs in your browser; nothing is uploaded.