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

> Reference material for JSON_IS_VALID function

# JSON_IS_VALID

Returns whether the input string is a valid JSON document.
Returns `NULL` if the input is `NULL`.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
JSON_IS_VALID(<json_string>)
```

### Aliases

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
JSON_VALID(<json_string>)
```

## Parameters

| Parameter       | Description                     | Supported input types |
| :-------------- | :------------------------------ | :-------------------- |
| `<json_string>` | The string to validate as JSON. | `TEXT`                |

## Return Type

The `JSON_IS_VALID` function returns a result of type `BOOL`.

## Remarks

If you want to know why the input string is invalid JSON, you can also use the [`CHECK_JSON`](/reference-sql/functions-reference/json/check-json) function.

## Examples

**Example**

The following code example validates a valid JSON string and returns `TRUE`:

<div className="query-window">
  ```
  SELECT JSON_IS_VALID('{"name": "John"}');
  ```

  | json\_is\_valid <span>boolean</span> |
  | :----------------------------------- |
  | True                                 |

  <p><span>Rows: 1</span><span>Execution time: 5.85ms</span></p>
</div>

**Example**

The following code example validates an invalid JSON string (two JSON objects concatenated) and returns `FALSE`:

<div className="query-window">
  ```
  SELECT JSON_IS_VALID('{"name": "John"}{"name": "John"}');
  ```

  | json\_is\_valid <span>boolean</span> |
  | :----------------------------------- |
  | False                                |

  <p><span>Rows: 1</span><span>Execution time: 5.33ms</span></p>
</div>
