Register Company in the BVI


Why BVI Company?


  • Taxation Exempt Status, No Corporate Tax
  • Confidentiality
  • Easy Set Up

Why our network


  • Our clients are members of the Association of Registered Agents in the BVI
  • Reliable BVI Registrars
  • Full Confidentiality
  • Competitive Quotes

In recent months, we have noticed increased interest from clients previously registering with various online “Buy online BVI Company services,” offered by resellers. Our members do not sell online and they are not middlemen. Most common complaints include communication delays (weeks/months instead of hours/days), hindering effective execution of client needs. Fill out the form to your right and get in touch with members of the official network.


One place, multiple quotes

Start now!

Receive multiple non-binding quotes from our brick-and-mortar BVI members

Step 1 of 2

0%

BVI Company Registration

What is a BVI Business Company

British Virgin Islands Business Company

“BVI BC” stands for International Business Company, the official name for the most popular “offshore company” instrument (before 2004, the official name of the instrument was BVI International Business Company or “BVI IBC“. Offshore services are generally connected to BVI BC’s.

An International Business company is a private corporation suitable for any international business transactions. The main benefits include confidentiality provisions and tax exemptions. Moreover, BVI International Business Companies offer low record-keeping requirements, flexible organizational structure and can be set up in a time-oriented manner.

Why should you choose the BVI as your territory for company registration?

Look at the official pages of British Virgin Islands International Finance Centre. “…the BVI has maintained its leadership position thanks to the flexibility of its legislation.” In other words, while still being accepted as a part of the Commonwealth, the BVI is managing to allow for unparalleled service. In the words of the Chief Minister of the BVI, Premier Dr. Orlando Smith (after announcing the new legislation): “The new BVI Business Companies Act was designed to safeguard the attributes that have made the BVI the world’s premier offshore company domicile. The collaborative effort to draft this new Act has resulted in legislation that not only retains all the virtues of the current IBC Act, but makes the BVI even more attractive to clients by including new features that have become desirable since the enactment of the current Act.”

How many BVI business companies are already registered?

To date, there have been over 800,000 business companies incorporated in the BVI, making it the world’s most popular offshore jurisdiction. The average number of newly incorporated companies per year is over 60,000.

History of the International Business Companies Act

First introduced by the International Business Companies Act in 1984, BVI International Business Companies became a model for the industry, with other offshore centres copying the model widely. The motion came as a response to U.S. cancellation of a double taxation relief treaty. After the US invasion of Panama in 1990, the investor’s confidence in Panama was shaken and the number of BVI companies grew significantly.

As a response to strike on the tax havens, new legislation had to be deployed in 2005. Under this legislation, a BVI Business Company removes the distinction between a domestic and international company, assuring the tax exemptions benefits of the previous legislation could be maintained.

7 Main advantages of BVI company registration compared to other offshore centres:


I. BVI Stability

BVI is one of the oldest offshore centers with a well established and reputable industry, which attracts international business to the jurisdiction.

II. Reputation of Compliance

Despite recent events, the US and European Governments consider BVI Companies assets more legitimate than those of other jurisdiction (partly because the BVI is a part of the Commonwealth).

III. Tax Exemption

All BVI companies are subject to 0% taxes on all transactions and profits, with the sole exception of property located in the BVI. That means no corporate or income tax, tax on dividends, royalties, etc.

IV. No value added tax in the BVI

Also, there is no value added tax in the BVI, allowing for swift and seamless transactions between companies

V. US Dollar

Internationally accepted US Dollar ensures for 1 important thing: your money supply is secure.

VI. Judicial System

The English Common Law system guarantees quick and just proceedings, that traditionally favor BVI Companies’ interests.

VII. Financial Stabilty

Since the living standards in the BVI are high (per capita income of $38,500), there is very limited probability that the BVI government would make concessions in exchange for financial aid.

What is NOT REQUIRED

  • hold meetings in the BVI
  • prepare audited accounts
  • file annual returns
  • appoint BVI resident directors
  • appoint a secretary

More advantages of a BVI Company include

  • Incorporations can be approved the same day
  • Incorporation can take place without execution of corporate documents by shareholders and directors
  • Quick and simple procedures for
  • Appointing and removing directors
  • Transferring and issuing shares
  • Amending articles and memorandum
  • Reducing and increasing shares
  • Easy liquidations





Confidentiality of information, particularly for BVI Business Company owners

What information is held in public records?

Only the Certificate of Incorporation and the Memorandum and Articles of Association are part of the public records. No information or indication of the actual owners and directors are public.

What information about a BVI Company is not held in public records?

Being the key feature of the BVI Business Company, secrecy is understood to be of highest importance. Company owners, directors and shareholders ARE NOT PART OF PUBLIC RECORD. All information about members, directors, are kept at the offices of Registered Agents, which is selected by the client. It is advisable not to use the cheapest offer on the market and choose the Registered Agent from one of our official Agents.

What if the information about BVI Company owners should be public?

In some cases, company shareholders might want to have the names of the owners publicly available. In such cases, it is possible to officially register the owners.

Have legal concerns about establishing a BVI company?

In many cases, the complexity of the law aspects require a BVI law firm to be involved. Among the leading companies, Sabal’s Law specializes not only at the initial issues to be solved, but also on long term interests, such as inheritance. Legal aspects within the BVI jurisdiction might require a legal consultation.

Questions and Answers about BVI Business Company registration

BVI company tax exemption explained

Every BVI Business Company enjoys exemption from income tax. In practice, the exemption is applied to any financial instruments, such as interest, dividends, royalties, compensations, capital gain and other securities. In case of estate, inheritance, gift or succession, no tax is payable. The only exception is land-ownership in the BVI, where stamp duty applies.

Legal personality of a BVI company explained

BVI Business Companies enjoy as much powers as natural person, having their legal personality separate from owners.

Can a BVI Company be confiscated?

There might be cases where a foreign government or authority takes control of the shares or interest in a BVI Business Company. In such cases, the BVI BC or a shareholder of the company can apply for a BVI court order, which returns the assets back into original owner’s hands.

Bearer shares of the BVI Business Company explained

Bearer share may not be issued to their actual owners. Instead, they are kept in custody of a licenced BVI custodian. Also, it is possible to select any custodian outside the BVI, provided the BVI custodian keeps a written document of the whereabouts of the foreign custodian.

Recommended by the Virgin Islands Property and Yacht Magazine

vipy_logo

ARE YOU READY? GET QUOTES NOW!
Get quotes from the BVI based company administrators
CiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSdnZl9icm93c2VyX3Vua25vd24gZ2Zvcm1fd3JhcHBlcicgaWQ9J2dmb3JtX3dyYXBwZXJfMicgPjxmb3JtIG1ldGhvZD0ncG9zdCcgZW5jdHlwZT0nbXVsdGlwYXJ0L2Zvcm0tZGF0YScgdGFyZ2V0PSdnZm9ybV9hamF4X2ZyYW1lXzInIGlkPSdnZm9ybV8yJyAgYWN0aW9uPScvJz4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0nZ2Zvcm1faGVhZGluZyc+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0nZ2Zvcm1fZGVzY3JpcHRpb24nPjwvc3Bhbj4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPGRpdiBpZD0nZ2ZfcHJvZ3Jlc3NiYXJfd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