Quasar QTable Columns Generator
Paste a JSON array of rows and get a typed QTable columns array, with alignment, sorting and a format for dates and numbers, plus a ready q-table.
Your rows
4 rows, 9 columns. Nothing leaves your browser.
Columns
Rename a label, change the type when a guess is wrong, or untick a column to leave it out.
idSort
customer.nameSort
customer.countrySort
amountCentsSort
seatsSort
issuedAtSort
paidAtSort
autoRenewSort
tagsSort
import type { QTableColumn } from 'quasar'
interface Row {
id: number
customer: { name: string; country: string }
amountCents: number
seats: number
issuedAt: string
paidAt: string | null
autoRenew: boolean
tags: string[]
}
const numberFormat = new Intl.NumberFormat('en-US')
const moneyFormat = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' })
// Date-only strings parse as UTC midnight, so format them in UTC.
const dateFormat = new Intl.DateTimeFormat('en-US', { dateStyle: 'medium', timeZone: 'UTC' })
const dateTimeFormat = new Intl.DateTimeFormat('en-US', { dateStyle: 'medium', timeStyle: 'short' })
const columns: QTableColumn<Row>[] = [
{
name: 'id',
label: 'ID',
field: 'id',
align: 'left',
sortable: true,
},
{
name: 'customerName',
label: 'Customer name',
field: row => row.customer.name,
align: 'left',
sortable: true,
},
{
name: 'customerCountry',
label: 'Customer country',
field: row => row.customer.country,
align: 'left',
sortable: true,
},
{
name: 'amountCents',
label: 'Amount',
field: 'amountCents',
align: 'right',
sortable: true,
format: (val: number) => moneyFormat.format(val / 100),
},
{
name: 'seats',
label: 'Seats',
field: 'seats',
align: 'right',
sortable: true,
format: (val: number) => numberFormat.format(val),
},
{
name: 'issuedAt',
label: 'Issued',
field: 'issuedAt',
align: 'left',
sortable: true,
format: (val: string) => dateFormat.format(new Date(val)),
},
{
name: 'paidAt',
label: 'Paid',
field: 'paidAt',
align: 'left',
sortable: true,
format: (val: string | null) => (val == null ? '' : dateTimeFormat.format(new Date(val))),
},
{
name: 'autoRenew',
label: 'Auto renew',
field: 'autoRenew',
align: 'center',
sortable: true,
format: (val: boolean) => (val ? 'Yes' : 'No'),
},
{
name: 'tags',
label: 'Tags',
field: 'tags',
align: 'left',
sortable: false,
format: (val: string[]) => val.join(', '),
},
]Paste it into the script of the component that renders your q-table. The Row interface is inferred from every pasted row.
Preview
A real QTable with these columns. Click a header to check how it sorts.
| ID | Customer name | Customer country | Amount | Seats | Issued | Paid | Auto renew | Tags |
|---|---|---|---|---|---|---|---|---|
| 1042 | Acme Corp | US | $1,200.00 | 12 | Nov 3, 2026 | Nov 10, 2026, 2:32 PM | Yes | annual |
| 1043 | Globex | DE | $950.00 | 8 | Oct 28, 2026 | No | ||
| 1044 | Initech | GB | $45.00 | 1 | Oct 15, 2026 | Oct 20, 2026, 9:05 AM | Yes | monthly, discount |
| 1045 | Umbrella | US | $2,100.00 | 25 | Sep 30, 2026 | Oct 2, 2026, 4:48 PM | Yes | annual |
Records per page:
1–4 of 4
How to use the Quasar QTable Columns Generator
- Paste a JSON array of rows into Your rows, for example a response copied from your browser's network tab. An object that wraps the array, like { "data": [...] }, works too.
- Check the columns: each key becomes one column, nested objects are flattened into their own columns, and the type picks the alignment and the format.
- Fix any guess that is wrong: rename a label, switch a number to Money or an amount to Money in cents, turn sorting off, or untick a column you don't want.
- Click a header in the preview to make sure each column sorts the way you expect.
- Copy the columns array, or the complete QTable component, and paste it into your Quasar app.
Need the rest of the screen around the table? Browse ready-made Quasar components for data tables, filters and dashboards.
Frequently asked questions
How does the generator choose align, sortable and format?
Why does field keep the raw value instead of the formatted text?
What happens to nested objects and missing values?
Does the output work without TypeScript?
Is my data sent anywhere?