---
title: "isValidUrl"
description: "Check whether a string is a parseable URL, returning a boolean so you can validate user input before building links or fetching."
canonical_url: "https://core.mhaibaraai.cn/en/docs/utilities/url/is-valid-url"
---
# isValidUrl

> Check whether a string is a parseable URL, returning a boolean so you can validate user input before building links or fetching.

## Usage

`isValidUrl` checks whether a string is a valid URL.

```ts
import { isValidUrl } from '@movk/core'

isValidUrl('https://example.com') // true
isValidUrl('not a url') // false
isValidUrl('ftp://files.example.com') // true
```

## API

### `isValidUrl(url)`

Check whether a string is a valid URL.

### Parameters

**url** (`string`) *required*: The string to check.

### Returns

**returns** (`boolean`): Whether the string is a valid URL.

## Changelog

See commit history for [src/utilities/url/parse.ts](https://github.com/mhaibaraai/movk-core/commits/main/src/utilities/url/parse.ts).

---

- [GitHub](https://github.com/mhaibaraai/movk-core/blob/main/src/utilities/url/parse.ts)


## Sitemap

See the full [sitemap](https://core.mhaibaraai.cn/sitemap.md) for all pages.
