# Config Validator: Check QBCore Lua, JSON & server.cfg Files Online

Paste a Lua config, a JSON config, or a `server.cfg` and get findings grouped by how much
confidence they deserve. Everything runs in your browser. Your file is read as text, never
executed, and never uploaded.

## The three kinds of finding

Results are grouped so you can tell a real defect from a suggestion.

**Syntax.** Mechanical and reliable. Unbalanced brackets, unterminated strings, unterminated long
comments, and, for JSON, a real parse error with position. If one of these fires, the file is
malformed.

**QBCore and FiveM rules.** Requirements backed by an upstream manifest or the Cfx documentation.
Every finding in this group names its source, so you can check the claim rather than trust it.

**Heuristics.** Pattern matches that are often right but have no authority behind them: a suspected
secret, a debug flag, a missing conventional key. Ignore them when you have a reason.

## What gets checked

### Lua and JSON configs

- Balanced delimiters and unterminated strings, with Lua long strings (`[[ ]]`) and long comments
  (`--[[ ]]`) handled correctly.
- `//` is treated as integer division in Lua, not as a comment, so arithmetic is not misread.
- JSON is fully parsed, so its syntax results are exact.
- Missing `Config` table or JSON root object.
- Suspected hardcoded secrets in keys such as `password`, `token`, and `api_key`.
- Debug flags left enabled.
- Missing conventional keys such as `Config.Locale` and `Config.UseTarget`.

### server.cfg

Name the file `server.cfg` to unlock these. Start order is a real constraint, not a style
preference, because a resource referenced with `@` must already be started when the referencing
resource loads.

- **oxmysql before qb-core.** `qb-core` declares `dependency 'oxmysql'` and loads
  `@oxmysql/lib/MySQL.lua` at startup.
- **Possible qb-core dependencies.** A `qb-*` prefix produces a heuristic warning, not proof
  that a resource imports the core. Inspect its manifest or use the
  [Compatibility Analyzer](/tools/compatibility-analyzer) with the actual resource files.
- **qb-weapons before qb-inventory.** `qb-inventory` declares it as a dependency.
- **Duplicate starts.** The same resource ensured or started twice.
- **OneSync and slot count.** `sv_maxclients` from 32 up requires `onesync` set to `on` or
  `legacy`, and above 64 requires `on`. The documented range is 1 to 2048.
- **Secrets published to the world.** Using `sets` rather than `set` for a password or key puts the
  value in the public server info.
- **Placeholder or short `rcon_password`,** and a placeholder `sv_licenseKey`.
- **`start` versus `ensure`.** `ensure` starts a resource, or restarts it if it was already
  running, which makes reloads predictable.

## What it cannot tell you

Read the "What this validator cannot tell you" panel under any result for the exact list. In short:

- It is a text scan, not a Lua interpreter. A file that scans clean can still fail at runtime.
- It reads only the file in front of it. Resources started by another cfg through `exec`, or by a
  txAdmin recipe, are invisible, so a "missing" resource may simply live elsewhere.
- It cannot see your `resources` folder, so a typo in a resource name looks like an unknown
  resource rather than a typo.
- It checks literal assignments. Values built from functions, loops, or other files are invisible.

## Rollout tips

- Add a CI step to lint configs before deployment.
- Keep sample configs in `config.example.*` and never commit secrets.
- Redact `sv_licenseKey`, `rcon_password`, and `steam_webApiKey` before pasting a cfg anywhere for
  help, including here.
- After large edits, run resmon and smoke-test start and stop flows for each resource.
