Requestly
HTTP InterceptorPricingRequestly vs PostmanBlogDocsDownload

Home / Products / Easily Switch Hosts using Replace Rule to make Cross-Environment Connections

Dynamically replace web strings, simplify testing

Switch Hosts

Redirect API Calls for Testing

Seamlessly Switch API Environments​

Test New API Versions Without Code Changes

Trusted by 300,000+ developers from Fortune 500 companies.

Your Development Companion

Gain comprehensive control over APIs for testing, switching environments and accelerating your development.

Replace Multiple parts of a URL modify and mock graphql, apis replace ulr

Supports APIs triggered as XHR or fetch ### GraphQL Support ### Match URLs using Regex

Use regular expressions to achieve intricate URL pattern matching without the need for overly complex, indirect approaches. This grants you granular control over your URL replacements in a more streamlined manner. Learn more -> Modify Request Body | Match URLs using Regex

Collaboration & 1-Click Sharing

Promote consistency and accelerate development by sharing Requestly rules within your team. Collaboration 1 Click Sharing

More features for your testing needs

These HTTP Rules designed for all your local development and testing needs. Modify Responses Intercept, Modify & Mock API Responses in Real-Time Replace string Replace part of URL like hostname, query values. Redirect URL Redirect any URL to a new destination. Modify Headers Modify HTTP request & response headers. Query params Add or Remove Query Parameters Insert scripts Inject Custom JS & CSS on any website(s). Delay network Simulate delay in response of API calls. Modify request body Modify body of website or application POST requests.

Frequently Asked Questions​

What does the Replace Rule do in Requestly?

The Replace Rule lets you find and replace specific text in network responses directly in the browser. This helps you modify API responses, HTML, JavaScript, CSS, or other text-based resources without changing the actual server response.

What kind of content can I modify using the Replace Rule?

You can replace text in API responses, HTML pages, JavaScript files, CSS files, JSON responses, and other text-based resources. As long as the response contains searchable text, you can modify it during interception.

Is Requestly open-source

Feel free to check out the GitHub repo

Is the Replace Rule available in the free plan?

Yes, the Replace Rule is available in Requestly’s free plan, allowing you to intercept and modify responses without requiring a paid subscription.

Do I need a paid plan to create multiple Replace rules?

No, you can create and use Replace rules on the free plan. Paid plans mainly unlock collaboration, syncing, and advanced team workflows.

Is Requestly free for students?

Yes! Requestly is free for students, enjoy access to powerful tools and features with no cost.

Why is my text not getting replaced?

The response content may not exactly match your search text, or the response may be compressed, cached, or dynamically generated. Inspect the actual network response in browser DevTools and verify the exact text being returned.

Why Aren’t My Requestly Rules Working?

Rule not working doc

How do I replace an API response value using Requestly?

Create a Replace Rule, add the API endpoint in the source condition, enter the text you want to find, provide the replacement value, save the rule, and refresh your application. Matching responses will now return the modified value.

How do I replace environment URLs in JavaScript files?

Target the JavaScript file URL, search for the existing API base URL or environment string, replace it with your desired value, and reload the application to test the new environment.

How do I replace multiple values in the same response?

Add multiple find-and-replace pairs inside a single Replace Rule. Requestly will process all configured replacements on matching responses.

Effortless team collaboration

Share instantly, sync effortlessly, and collaborate effectively with your team in dedicated workspaces.

Learn more →

Quick One time sharing

Instantly generate and share a link to your rules and more

Team workspaces

Collaborate easily with teammates in a shared workspace.

Export data & sync to Git

Easily version-control your configs by exporting and syncing

Secure and private

Enterprise-ready security and compliance

Requestly ensures top-tier security with SOC-II compliance, SSO integration, and role-based access control. We protect your data and secure your workflows, making us the ideal choice for enterprises.

SOC-II Compliance

Adheres to rigorous security standards for data protection and privacy.

Single Sign-On (SSO)

Simplifies user access with secure, centralized authentication.

Role-based access control

Ensures precise control over user permissions and data access.

Data encryption

Protects your data in transit and at rest with advanced encryption protocols.

Audit logs

Tracks and records user actions and system events, giving you complete visibility.

Regular security updates

Keeps your environment secure with timely updates and patches.

Ready to try it yourself?

Intercept, modify and mock HTTP requests in your browser or on desktop. Free to use.

Free · macOS, Windows & Linux