You'll receive

Bi-weekly updates

Exclusive discounts

Product update alerts

Format SQL with over 160 options
Qualify objects and expand wildcards
Encapsulate SQL into procedures
Add surrogate keys
Replace one-to-many relationships
Change procedure parameters
Safely rename SQL objects
Locate & highlight unused variables
Format SQL objects
Obfuscate SQL


Advanced SQL formatting

SQL code formatter with over 160 customizable options

See next feature

Impact analysis

Preview the impact of changes with difference highlighting

See next feature

Formatting profiles

Save and quickly toggle between different sets of formatting settings

See next feature

Batch formatting of SQL objects

Allows the formatting of all script based objects e.g. stored procedures, in a database, quickly and easily. Learn more

See next feature

Batch SQL scripts formatting

Format SQL scripts and script folders in batches

See next feature


Make SQL code less readable

See next feature

Wildcard expansion

Transform * wildcards into explicit lists of column names. Learn more

See next feature

Object name qualifying

Qualify columns with schema table names and schema or aliases. Learn more

See next feature

Find unused variables and parameters

Clean up your code by identifying and removing parameters and variables that aren’t used. Learn more

See next feature

Safe rename

Rename tables, procedures, views, functions and columns risk-free. Learn more

See next feature

Add surrogate key

Replace complex, multi-column primary keys with a single column surrogate key. Learn more

See next feature

Replace one-to-many relationships

Add a new associative table to replace one-to-many relationships. Learn more

See next feature

Change parameters

Add, remove or change parameters without breaking dependencies from referencing objects. Learn more

See next feature

Encapsulate SQL

Convert blocks of SQL code into scalar or table functions, stored procedures and views. Automatically identify and create the input parameters. Learn more

See next feature

Split table

Improve your database design and make large tables more manageable by partitioning them. Learn more

See next feature

Copy SQL code as

Render T-SQL into its Java, C#, C++, VB .NET, PHP, Ruby, Delphi or PowerBuilder equivalent. Learn more

See next feature

Formatting option mockups and examples

This knowledgebase article contains mockups and examples for the most important formatting options in ApexSQL Refactor, such as Comments, Capitalization, Expressions, Schema Statements, Data Statements, Joins, and more

Quickly convert SQL code to language-specific client code

This article describes how to use ApexSQL Refactor convert your T-SQL script into a client language-specific syntax – Java, VB.NET, c#, Perl, PHP, Delphi, PowerBuilder, Ruby, C++, or other custom languages

SQL Formatting standards – Capitalization, Indentation, Comments, Parenthesis

This artice shows how to use ApexSQL Refactor to automatically implement all SQL formatting rules to ensure the code is readable

Clean up SQL code from variables you don’t use

This article describes how to use ApexSQL Refactor to clean up your code and remove unnecessary bloat

SQL Refactoring techniques – How to split a table in SQL

This article describes how to ApexSQL Refactor to split a table in SQL

SQL Formatting standards – joins, lists, structure, operations

This article provides some recommendations of using ApexSQL Refactor to format joins, value lists, code structure, arithmetic, comparison and logical operations

Rules of SQL formatting – Terminating SQL statements with semicolons

This article explains using a semicolon to terminate SQL statements, differences between the GO command and a semicolon

SQL code refactoring – ways to improve database performance – Encapsulate code as a stored procedure

This article describes how to use ApexSQL Refactor to “wrap up” the existing code and create stored procedures and functions.

Changing SQL stored procedures and functions parameters without breaking dependencies

This article explains how to change parameters of your functions or stored procedures safely using ApexSQL Refactor

How to safely modify SQL stored procedure and SQL function parameters

This article describes how to use ApexSQL Refactor to modify SQL functions parameters and stored procedures automatically

How to format SQL like a pro – formatting to implicit Microsoft standards and guidance

In this article, we describe how to implement MSDN, SQL Server online documentation, and Adventure Works formatting standards with ApexSQL Refactor

ApexSQL Refactor 2017 – Screen shot tour

This article represents a screen shot tour of ApexSQL Refactor features with a brief description

See more
ApexSQL Redgate®
SQL Server editions
      SQL Server Management Studio
      Visual Studio
Formatting options 262 54
      Indentation 3 3
      Wrapping 1 1
      Aliases 4
      Capitalization 23 15
      Comments 8
      Data types 3
      Expressions 53 8
      Flow control 13 1
      Joins 16 3
      Lists 100
      Parentheses 10 2
      Spacing and Empty lines 8 5
      Statements 30 18
      Variables 4
Formatting features
      Batch SQL objects formatting
      Batch SQL scripts formatting
      Impact preview
      Profiles 3 1
      Encapsulate code as: Stored procedure
      Find unused variables and parameters
      Object name qualifying
      Safe rename
      Split table
      Add surrogate key
      Change parameters
      Copy SQL code
      Encapsulate code as: Table inline function
      Encapsulate code as: Scalar inline function
      Encapsulate code as: View
      Replace one-to-many-relationship
Free $369

ApexSQL Refactor 2016.01

Redgate® SQL Prompt 7

Comparison was conducted on January 20, 2016

Redgate® SQL Prompt also includes Auto-complete. For a comparison of this functionality set click here

Disclaimer: All product and company names are trademarks or registered® trademarks of their respective holders.
ApexSQL is not affiliated, associated, authorized, endorsed by, or in any way officially connected with other companies listed or any of their subsidiaries or affiliates


The ApexSQL Refactor is a great help, and I'm glad to have found something that works well and is easy!

Alex Gadea

Sr. VP of Operations

Hostcentric Inc.

I'm a user of ApexSQL Refactor and I find it a really wonderful product.


Software Developer Consultant

I tried the ApexSQL Refactor product and liked it a lot. This is something I have been thinking would make my life a lot easier.

Mathias Hedlund

System Developer

Jeeves Information Systems AB

I used ApexSQL Complete and ApexSQL Refactor. Both are well designed and include all the modern feature compare to other competitors. I found tons of customization options that makes your tools powerful.

Mohammad Sanati

Software & Database developer

I’ve been using ApexSQL Refactor for about three years now and have found it to be the most customizable of any product on the market today. And it is FREE! Kudos to your development team!

Fred Botts

Database Administrator


I use ApexSQL Refactor for a couple of years and it helped me a lot in designing and throubleshooting stored procedures and long queries. Thanks for the high and specific customization that I didn’t find in other free products.

Alessandro Losi



See all of our other
Killer free tools


SQL Server database object decryption

Plan viewing

SQL query plan analysis and viewing


SQL auto-complete, snippets and more

Script comparison

Compare SQL scripts and SQL Server objects

Script execution

Multi-database script execution


Search SQL Server data and objects

Database lifecycle management (DLM)

SQL Server continuous integration (CI) and delivery (CD)